package com.zzc.mapper;

import com.select.pojo.Courses;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Service;

import java.sql.SQLTransactionRollbackException;
import java.util.List;

@Mapper
public interface CoursesMapper {


    @Select("select * from courses where tea_account=#{teaAccount}")
    public List<Courses> findAll(String teaAccount);
    @Select("select * from courses where cou_id=#{cou_id}")
    public Courses findone(String couId);
    @Update("update courses set cou_time=#{couTime},cou_week=#{couWeek},cr_place=#{crPlace},cou_introduce=#{couIntroduce} where cou_id=#{couId}")
    public Integer edit(@Param("couTime") String couTime,
                    @Param("couWeek") String couWeek,
                    @Param("crPlace")  String crPlace,
                    @Param("couIntroduce") String couIntroduce,
                    @Param("couId")  String couId);

}
